<g:javascript>
	$(document).ready(function(){
		$.ajax({
			url: "${createLink(controller:'ajax', action: 'workshop')}",
			success: function(data){
				for(var i=0; i<data.length; i++){
					$("#tb010").append("<option value='"+$.trim(data[i])+"'>"+$.trim(data[i])+"</option>");
				}
				$("#tb010").val("${fieldValue(bean: tbInstance, field: 'tb010')}");
			}
		});

	});
</g:javascript>
<table>
    <tbody>
    
        <tr class="prop">
            <td class="name">
                <label for="tb001"><g:message code="moc.tb.tb001.label" default="Tb001" /></label>
            </td>
            <td class="value ${hasErrors(bean: tbInstance, field: 'tb001', 'errors')}">
                <g:textField name="tb001" value="${tbInstance?.tb001}" />
            </td>
            <td class="name">
                <label for="orderDate"><g:message code="moc.tb.orderDate.label" default="Order Date" /></label>
            </td>
            <td class="value ${hasErrors(bean: tbInstance, field: 'orderDate', 'errors')}">
                <g:datePicker name="orderDate" precision="day" value="${tbInstance?.orderDate}"  years="${2010..2015}"/>
            </td>
            <td class="name">
                <label for="status"><g:message code="moc.tb.status.label" default="Status" /></label>
            </td>
            <td class="value ${hasErrors(bean: tbInstance, field: 'status', 'errors')}">
                <g:select name="status" from="${['\u672a\u751f\u4ea7', '\u5df2\u53d1\u6599', '\u751f\u4ea7\u4e2d', '\u5df2\u5b8c\u5de5', '\u6307\u5b9a\u5b8c\u5de5']}" value="${tbInstance?.status}" noSelection="['':'']"/>
            </td>
        </tr>
        
        <tr class="prop">
            <td class="name">
                <label for="beginDate"><g:message code="moc.tb.beginDate.label" default="Begin Date" /></label>
            </td>
            <td class="value ${hasErrors(bean: tbInstance, field: 'beginDate', 'errors')}">
                <g:datePicker name="beginDate" precision="day" value="${tbInstance?.beginDate}"  years="${2010..2015}"/>
            </td>
            <td class="name">
                <label for="endDate"><g:message code="moc.tb.endDate.label" default="End Date" /></label>
            </td>
            <td class="value ${hasErrors(bean: tbInstance, field: 'endDate', 'errors')}">
                <g:datePicker name="endDate" precision="day" value="${tbInstance?.endDate}"  years="${2010..2015}"/>
            </td>
            <td class="name">
                <label for="tb010"><g:message code="moc.tb.tb010.label" default="Tb010" /></label>
            </td>
            <td class="value ${hasErrors(bean: tbInstance, field: 'tb010', 'errors')}">
				<g:select name="tb010" value="${fieldValue(bean: tbInstance, field: 'tb010')}"  />
            </td>
        </tr>

        <tr class="prop">
            <td class="name">
                <label for="tb002"><g:message code="moc.tb.tb002.label" default="Tb002" /></label>
            </td>
            <td class="value ${hasErrors(bean: tbInstance, field: 'tb002', 'errors')}">
                <g:textField name="tb002" value="${fieldValue(bean: tbInstance, field: 'tb002')}" />
            </td>
            <td class="name">
                <label for="tb008"><g:message code="moc.tb.tb008.label" default="Tb008" /></label>
            </td>
            <td class="value ${hasErrors(bean: tbInstance, field: 'tb008', 'errors')}">
                <g:textField name="tb008" value="${fieldValue(bean: tbInstance, field: 'tb008')}" />
            </td>
            <td class="name">
                <label for="tb003"><g:message code="moc.tb.tb003.label" default="Tb003" /></label>
            </td>
            <td class="value ${hasErrors(bean: tbInstance, field: 'tb003', 'errors')}">
                <g:textField name="tb003" value="${tbInstance?.tb003}" />
            </td>
        </tr>
        
        <tr class="prop">
            <td class="name">
                <label for="tb009"><g:message code="moc.tb.tb009.label" default="Tb009" /></label>
            </td>
            <td class="value ${hasErrors(bean: tbInstance, field: 'tb009', 'errors')}">
                <g:textField name="tb009" value="${fieldValue(bean: tbInstance, field: 'tb009')}" />
            </td>
            <td class="name">
                <label for="tb011"><g:message code="moc.tb.tb011.label" default="Tb011" /></label>
            </td>
            <td class="value ${hasErrors(bean: tbInstance, field: 'tb011', 'errors')}">
                <g:textField name="tb011" value="${tbInstance?.tb011}" />
            </td>
            <td class="name">
                <label for="tb012"><g:message code="moc.tb.tb012.label" default="Tb012" /></label>
            </td>
            <td class="value ${hasErrors(bean: tbInstance, field: 'tb012', 'errors')}">
                <g:textField name="tb012" value="${tbInstance?.tb012}" />
            </td>
        </tr>
            
        <tr class="prop">
            <td class="name">
                <label for="tb004"><g:message code="moc.tb.tb004.label" default="Tb004" /></label>
            </td>
            <td class="value ${hasErrors(bean: tbInstance, field: 'tb004', 'errors')}">
                <g:textField name="tb004" value="${fieldValue(bean: tbInstance, field: 'tb004')}" />
            </td>
            <td class="name">
                <label for="tb005"><g:message code="moc.tb.tb005.label" default="Tb005" /></label>
            </td>
            <td class="value ${hasErrors(bean: tbInstance, field: 'tb005', 'errors')}">
                <g:textField name="tb005" value="${fieldValue(bean: tbInstance, field: 'tb005')}" />
            </td>
            <td class="name">
                <label for="tb006"><g:message code="moc.tb.tb006.label" default="Tb006" /></label>
            </td>
            <td class="value ${hasErrors(bean: tbInstance, field: 'tb006', 'errors')}">
                <g:textField name="tb006" value="${fieldValue(bean: tbInstance, field: 'tb006')}" />
            </td>
        </tr>
            
    </tbody>
</table>